module EventsHelper

	def check(object)
		current_user.events.find(:first, :conditions=>{:eventable_id => object.id, :eventable_type => object.class.name})
	end

	def check_for_friend(user)
		ev = user.events.find(:first, :conditions=>{:eventable_id => current_user.id, :eventable_type => "User"})
		return (ev ? true : false)
	end

end
